import request from '@/utils/request'

export function paginate(form, page, page_size) {
  return request({
    url: '/api/pajx/tea/card/paginate',
    method: 'post',
    data: {
      page_num: page,
      page_size: page_size,
      hxy_scl_id: form.hxy_scl_id,
      status_flag: form.status_flag,
      keyword: form.keyword
    }
  })
}

export function bind(form) {
  return request({
    url: '/api/pajx/tea/card/bind',
    method: 'post',
    data: {
      tea_card_id: form.tea_card_id,
      card_type_flag: form.card_type_flag,
      card_sn: form.card_sn
    }
  })
}

export function unbind(tea_card_id) {
  return request({
    url: '/api/pajx/tea/card/unbind',
    method: 'post',
    data: {
      tea_card_id: tea_card_id
    }
  })
}
